package ast_generator;

import java.util.ArrayList;

public class ASTNode {
	private ASTNode left;
	private ASTNode right;
	private ArrayList<String> value;
	private boolean operation;

	public ASTNode() {
		left = null;
		right = null;
		value = null;
		operation = false;
	}
	
	public ASTNode(ArrayList<String> value, Boolean operation) {
		left = null;
		right = null;
		this.value = value;
		this.operation = operation;
	}
	
	public ASTNode(ASTNode left, ArrayList<String> value, Boolean operation) {
		this.left = left;
		right = null;
		this.value = value;
		this.operation = operation;
	}
	
	public ASTNode(ArrayList<String> value, ASTNode right, Boolean operation) {
		this.value = value;
		left = null;
		this.right = right;
		this.operation = operation;
	}

	public ASTNode(ASTNode left, ArrayList<String> value, ASTNode right, Boolean operation) {
		this.left = left;
		this.value = value;
		this.right = right;
		this.operation = operation;
	}
	
	public ASTNode getRight() {
		return right;
	}
	
	public void setRight(ASTNode right) {
		this.right = right;
	}
	
	public ASTNode getLeft() {
		return left;
	}
	
	public void setLeft(ASTNode left) {
		this.left = left;
	}
	
	public boolean isOperation() {
		return operation;
	}
	
	public boolean isInput() {
		return !operation;
	}
	
	public void setOperation(boolean operation) {
		this.operation = operation;
	}
	
	public ArrayList<String> getValue() {
		return value;
	}
	
	public void setValue(ArrayList<String> value) {
		this.value = value;
	}
}
